package org.simtube.gui;

import javax.swing.JLabel;

import org.simtube.query.QueryController;

public class BenchTestThread extends Thread {
	private QueryController qc;
	private JLabel label;
	
	public BenchTestThread(QueryController qc, JLabel label) {
		this.qc = qc;
		this.label = label; 
	}
	
	public void run() {
		label.setText("Status: bench test starts...");
		long start = System.nanoTime();
		qc.testBench();
		long end = System.nanoTime();
		label.setText("Status: bench test finished... " + (end - start) / 1000000 
				+ "ms in total");
	}
}
